<?php
declare (strict_types=1);

namespace app\api\controller;

use app\api\service\Notify as NotifyService;

/**
 * 支付成功异步通知接口
 * Class Notify
 * @package app\api\controller
 */
class Notify extends Controller
{
    /**
     * 支付成功异步通知 (微信支付)
     * @return string
     */
    public function wechatV3(): string
    {
        // file_put_contents('wxpaylog.txt', json_encode(input('post.')));
        // file_put_contents('header.txt', json_encode(\request()->header()));exit;
        try {
            $NotifyService = new NotifyService;
            return $NotifyService->wechatV3();
        } catch (\Throwable $e) {
            return '{"code": "FAIL","message": "失败"}';
        }
    }
}
